#
# Helper script to register library dependencies
#
# This function sets up the dependencies for libraries that are built with
# this project.  Specify the libraries you need to depend on in the variables
# STATIC_LIBRARIES and DYNAMIC_LIBRARIES


win32: STAT_EXT=lib
else:  STAT_EXT=a

for( dep, STATIC_LIBRARIES ) {
	message($$TARGET depends on $$dep ($${DESTDIR}/$${dep}.$${STAT_EXT}))
	LIBS += $${DESTDIR}/lib$${dep}.$${STAT_EXT}
	PRE_TARGETDEPS += $${DESTDIR}/lib$${dep}.$${STAT_EXT}
}



# On windows, a shared object is a .dll
win32: DYN_EXT=dll
else:  DYN_EXT=so

for(dep, DYNAMIC_LIBRARIES) {
	message($$TARGET depends on $$dep ($${DESTDIR}/$${dep}.$${DYN_EXT}))
	LIBS += $${DESTDIR}/lib$${dep}.$${DYN_EXT}
	PRE_TARGETDEPS += $${DESTDIR}/lib$${dep}.$${DYN_EXT}
}

#
# From http://lists.qt.nokia.com/pipermail/qt-creator/2009-September/004489.html
#
# defineReplace(asl) {
#   PRE_TARGETDEPS += $$munge($$1)
#   export(PRE_TARGETDEPS)
#   return($$1)
# }
#
# LIBS += $$asl(foobar)
#

